<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>运行时配置</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="com.installation.html">安装</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="com.resources.html">资源类型</a></div>
 <div class="up"><a href="com.setup.html">安装／配置</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="com.configuration" class="section">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
 <table class="doctable table">
  <caption><strong>COM 配置选项</strong></caption>
  
   <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

   </thead>

   <tbody class="tbody">
    <tr>
     <td> <a href="com.configuration.html#ini.com.allow-dcom" class="link">com.allow_dcom</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_SYSTEM</td>
     <td>自 PHP 4.0.5 起可用</td>
    </tr>

    <tr>
     <td><a href="com.configuration.html#ini.com.autoregister-typelib" class="link">com.autoregister_typelib</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>在 PHP 4 中是 PHP_INI_SYSTEM。自 PHP 4.1.0 起可用</td>
    </tr>

    <tr>
     <td><a href="com.configuration.html#ini.com.autoregister-verbose" class="link">com.autoregister_verbose</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>在 PHP 4 中是 PHP_INI_SYSTEM。自 PHP 4.1.0 起可用</td>
    </tr>

    <tr>
     <td><a href="com.configuration.html#ini.com.autoregister-casesensitive" class="link">com.autoregister_casesensitive</a></td>
     <td>&quot;1&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>在 PHP 4 中是 PHP_INI_SYSTEM。自 PHP 4.1.0 起可用</td>
    </tr>

    <tr>
     <td><a href="com.configuration.html#ini.com.code-page" class="link">com.code_page</a></td>
     <td>&quot;&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>自 PHP 5.0.0 起可用</td>
    </tr>

    <tr>
     <td><a href="com.configuration.html#ini.com.typelib-file" class="link">com.typelib_file</a></td>
     <td>&quot;&quot;</td>
     <td>PHP_INI_SYSTEM</td>
     <td>自 PHP 4.0.5 起可用</td>
    </tr>

   </tbody>
  
 </table>

 有关 PHP_INI_* 样式的更多详情与定义，见 <a href="configuration.changes.modes.html" class="xref">配置可被设定范围</a>。
 </p>

 <p class="para">这是配置指令的简短说明。</p>

 <p class="para">
  <dl>

   
    <dt id="ini.com.allow-dcom">
     <em><code class="parameter">com.allow_dcom</code></em>
    </dt>

    <dd>

    <p class="para">
     如果打开此选项，PHP 将被允许以一个 D-COM（Distributed
     COM）客户方式操作并允许 PHP 脚本在远程服务器上实例化 COM 对象。
    </p>
    </dd>

   

   
    <dt id="ini.com.autoregister-typelib">
     <em><code class="parameter">com.autoregister_typelib</code></em>
    </dt>

    <dd>

    <p class="para">
     When this is turned on, PHP will attempt to register constants from
     the typelibrary of objects that it instantiates, if those objects
     implement the interfaces required to obtain that information.
     The case sensitivity of the constants it registers is controlled by the
     <a href="com.configuration.html#ini.com.autoregister-casesensitive" class="xref"></a> configuration directive.
    </p>
    </dd>

   

   
    <dt id="ini.com.autoregister-verbose">
     <em><code class="parameter">com.autoregister_verbose</code></em>
    </dt>

    <dd>

    <p class="para">
     When this is turned on, any problems with loading a typelibrary during
     object instantiation will be reported using the PHP error mechanism.
     The default is off, which does not emit any indication if there was
     an error finding or loading the type library.
    </p>
    </dd>

   

   
    <dt id="ini.com.autoregister-casesensitive">
     <em><code class="parameter">com.autoregister_casesensitive</code></em>
    </dt>

    <dd>

    <p class="para">
     When this is turned on (the default), constants found in auto-loaded
     type libraries will be registered case sensitively.  See
     <span class="function"><a href="function.com-load-typelib.html" class="function">com_load_typelib()</a></span> for more details.
    </p>
    </dd>

   

   
    <dt id="ini.com.code-page">
     <em><code class="parameter">com.code_page</code></em>
    </dt>

    <dd>

    <p class="para">
     It controls the default character set code-page to use when passing
     strings to and from COM objects.  If set to an empty string, PHP will
     assume that you want <strong><code>CP_ACP</code></strong>, which is the default
     system ANSI code page.
    </p>
    <p class="para">
     If the text in your scripts is encoded using a different
     encoding/character set by default, setting this directive will save you
     from having to pass the code page as a parameter to the <a href="class.com.html" class="xref">COM</a> class constructor.  Please note that by
     using this directive (as with any PHP configuration directive), your PHP
     script becomes less portable; you should use the COM constructor parameter
     whenever possible.
    </p>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <span class="simpara">
      This configuration directive was introduced with PHP 5.
     </span>
    </p></blockquote>
    </dd>

   

   
    <dt id="ini.com.typelib-file">
     <em><code class="parameter">com.typelib_file</code></em>
    </dt>

    <dd>

    <p class="para">
     When set, this should hold the path to a file that contains a list
     of typelibraries that should be loaded on startup.  Each line of
     the file will be treated as the type library name and loaded as
     though you had called <span class="function"><a href="function.com-load-typelib.html" class="function">com_load_typelib()</a></span>.
     The constants will be registered persistently, so that the library
     only needs to be loaded once.  If a type library name ends with the
     string <em>#cis</em> or <em>#case_insensitive</em>,
     then the constants from that library will be registered case
     insensitively.
    </p>
    </dd>

   

  </dl>

 </p>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="com.installation.html">安装</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="com.resources.html">资源类型</a></div>
 <div class="up"><a href="com.setup.html">安装／配置</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
